<?PHP
require_once "../../../mainfile.php";
require_once "includes/mysql2json.php"; 
$result = $xoopsDB->query( 
	"select 
	con.storyid
	,con.title
	,con.category
	,cat.category AS cat_title 
from 
	".$xoopsDB->prefix("content_categories")." as cat
left outer join 
	".$xoopsDB->prefix("content")." as con
on 
	cat.ID = con.category
order by cat_title asc, con.title asc;"
);
$objJSON=new mysql2json();
print("/*".trim($objJSON->getJSON($result,$xoopsDB->getAffectedRows($result)))."*/");
?>
